<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>PVRTTextureAPI.h File Reference</h1><code>#include "<a class="el" href="PVRTError_8h-source.html">../PVRTError.h</a>"</code><br>

<p>
Include dependency graph for PVRTTextureAPI.h:<p><center><img src="PVRTTextureAPI_8h__incl.png" border="0" usemap="#PVRTTextureAPI.h_map" alt="Include dependency graph"></center>
<map name="PVRTTextureAPI.h_map">
<area href="PVRTError_8h.html" shape="rect" coords="19,81,128,108" alt="">
</map>

<p>
This graph shows which files directly or indirectly include this file:<p><center><img src="PVRTTextureAPI_8h__dep__incl.png" border="0" usemap="#PVRTTextureAPI.hdep_map" alt="Included by dependency graph"></center>
<map name="PVRTTextureAPI.hdep_map">
<area href="OGLES2Tools_8h.html" shape="rect" coords="15,7,132,34" alt="">
</map>

<p>
<a href="PVRTTextureAPI_8h-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="PVRTError_8h.html#a5">EPVRTError</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a0">PVRTTextureLoadFromPointer</a> (const void *pointer, GLuint *const texName, const void *psTextureHeader=NULL, bool bAllowDecompress=true, const unsigned int nLoadFromLevel=0, const void *const texPtr=0)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="PVRTError_8h.html#a5">EPVRTError</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a1">PVRTTextureLoadFromPVR</a> (const char *const filename, GLuint *const texName, const void *psTextureHeader=NULL, bool bAllowDecompress=true, const unsigned int nLoadFromLevel=0)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="PVRTTextureAPI_8h.html#a2">PVRTTextureFormatGetBPP</a> (const GLuint nFormat, const GLuint nType)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a2" doxytag="PVRTTextureAPI.h::PVRTTextureFormatGetBPP" ></a><p>
<br><br><h3>PVRTTextureFormatGetBPP</h3><br><div>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int PVRTTextureFormatGetBPP </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const GLuint&nbsp;</td>
          <td class="mdname" nowrap> <em>nFormat</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const GLuint&nbsp;</td>
          <td class="mdname" nowrap> <em>nType</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Inputs:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>nFormat</em>&nbsp;</td><td></td></tr>
    <tr><td valign=top><em>nType</em>&nbsp;</td><td></td></tr>
  </table>
</dl>
<dl compact><dt><b>Description:</b></dt><dd>Returns the bits per pixel (BPP) of the format. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a0" doxytag="PVRTTextureAPI.h::PVRTTextureLoadFromPointer" ></a><p>
<br><br><h3>PVRTTextureLoadFromPointer</h3><br><div>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="PVRTError_8h.html#a5">EPVRTError</a> PVRTTextureLoadFromPointer </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const void *&nbsp;</td>
          <td class="mdname" nowrap> <em>pointer</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>GLuint *const&nbsp;</td>
          <td class="mdname" nowrap> <em>texName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap> <em>psTextureHeader</em> = NULL, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>bAllowDecompress</em> = true, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>nLoadFromLevel</em> = 0, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const void *const&nbsp;</td>
          <td class="mdname" nowrap> <em>texPtr</em> = 0</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Inputs:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>pointer</em>&nbsp;</td><td>Pointer to header-texture's structure </td></tr>
  </table>
</dl>
<dl compact><dt><b>Modified:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>texName</em>&nbsp;</td><td>the OpenGL ES texture name as returned by glBindTexture </td></tr>
    <tr><td valign=top><em>psTextureHeader</em>&nbsp;</td><td>Pointer to a <a class="el" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> struct. Modified to contain the header data of the returned texture Ignored if NULL. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Inputs:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>bAllowDecompress</em>&nbsp;</td><td>Allow decompression if PVRTC is not supported in hardware. </td></tr>
    <tr><td valign=top><em>nLoadFromLevel</em>&nbsp;</td><td>Which mipmap level to start loading from (0=all) </td></tr>
    <tr><td valign=top><em>texPtr</em>&nbsp;</td><td>If null, texture follows header, else texture is here. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>PVR_SUCCESS on success </dd></dl>
<dl compact><dt><b>Description:</b></dt><dd>Allows textures to be stored in C header files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="PVRTTextureAPI.h::PVRTTextureLoadFromPVR" ></a><p>
<br><br><h3>PVRTTextureLoadFromPVR</h3><br><div>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="PVRTError_8h.html#a5">EPVRTError</a> PVRTTextureLoadFromPVR </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *const&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>GLuint *const&nbsp;</td>
          <td class="mdname" nowrap> <em>texName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const void *&nbsp;</td>
          <td class="mdname" nowrap> <em>psTextureHeader</em> = NULL, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>bAllowDecompress</em> = true, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const unsigned int&nbsp;</td>
          <td class="mdname" nowrap> <em>nLoadFromLevel</em> = 0</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Inputs:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>filename</em>&nbsp;</td><td>Filename of the .PVR file to load the texture from </td></tr>
  </table>
</dl>
<dl compact><dt><b>Modified:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>texName</em>&nbsp;</td><td>the OpenGL ES texture name as returned by glBindTexture </td></tr>
    <tr><td valign=top><em>psTextureHeader</em>&nbsp;</td><td>Pointer to a <a class="el" href="structPVR__Texture__Header.html">PVR_Texture_Header</a> struct. Modified to contain the header data of the returned texture Ignored if NULL. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Inputs:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>bAllowDecompress</em>&nbsp;</td><td>Allow decompression if PVRTC is not supported in hardware. </td></tr>
    <tr><td valign=top><em>nLoadFromLevel</em>&nbsp;</td><td>Which mipmap level to start loading from (0=all) </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>PVR_SUCCESS on success </dd></dl>
<dl compact><dt><b>Description:</b></dt><dd>Allows textures to be stored in binary PVR files and loaded in. Can load parts of a mipmaped texture (ie skipping the highest detailed levels). Sets the texture MIN/MAG filter to GL_LINEAR_MIPMAP_NEAREST/GL_LINEAR if mipmaps are present, GL_LINEAR/GL_LINEAR otherwise. </dd></dl>
    </td>
  </tr>
</table>
<br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
